import Mock from 'mockjs'
export default [
  {
    // 请求的地址
    url: '/article/list',
    // 请求方式
    method: 'get',
    // 响应的延时
    // timeout: 2000,
    // 响应数据
    response: () => {
      const data = []
      for (let i = 0; i < 80; i++) {
        data.push(
          Mock.mock({
            id: Mock.Random.id(),
            title: Mock.Random.ctitle(10, 15),
            content: Mock.Random.cparagraph(100, 150),
            address: '@county(true)',
            time: '@datetime()'
          })
        )
      }
      return {
        code: 10000,
        msg: '获取成功',
        data: data
      }
    }
  },
  {
    // 请求的地址
    url: '/userInfo',
    // 请求方式
    method: 'get',
    // 响应的延时
    // timeout: 2000,
    // 响应数据
    response: () => {
      const data = Mock.mock({
        name: '@cname',
        'age|1-100': 100,
        avatar: Mock.Random.image('200x100')
      })
      return {
        code: 10000,
        msg: '获取成功',
        data: data
      }
    }
  }
]
